VERSION 5.00
Object = "{736A8444-E374-41A8-B526-1B07FD2F3F5B}#1.0#0"; "BLacKPeaRLOCX.ocx"
Begin VB.Form FrmFirstPassword 
   BackColor       =   &H00000000&
   BorderStyle     =   0  'None
   Caption         =   "Set Password Sysadmin"
   ClientHeight    =   3120
   ClientLeft      =   0
   ClientTop       =   -45
   ClientWidth     =   4560
   Icon            =   "FrmFirstPassword.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3120
   ScaleWidth      =   4560
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin BLacKPeaRLOCX.BLacKFrame c 
      Height          =   3135
      Left            =   0
      TabIndex        =   4
      Top             =   0
      Width           =   4575
      _ExtentX        =   8070
      _ExtentY        =   5530
      BackColor1      =   4210752
      BackColor2      =   0
      BackGradient    =   1
      Caption         =   "Set Password For First Time"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   49152
      TitleColor1     =   8421504
      TitleColor2     =   0
      TitleGradient   =   2
      TitleHeight     =   350
      BorderColor     =   49152
      BorderWidth     =   2
      Begin VB.TextBox TxtPasswordLagi 
         BackColor       =   &H00404040&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   250
         IMEMode         =   3  'DISABLE
         Left            =   1710
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1845
         Width           =   2415
      End
      Begin VB.TextBox TxtPassword 
         BackColor       =   &H00404040&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   250
         IMEMode         =   3  'DISABLE
         Left            =   1710
         PasswordChar    =   "*"
         TabIndex        =   0
         Top             =   1365
         Width           =   2415
      End
      Begin VB.TextBox TxtUser 
         BackColor       =   &H00404040&
         BorderStyle     =   0  'None
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   250
         Left            =   1710
         TabIndex        =   8
         Top             =   885
         Width           =   2415
      End
      Begin BLacKPeaRLOCX.ButtonNix cmdbatal 
         Height          =   375
         Left            =   3000
         TabIndex        =   3
         Top             =   2400
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Tutup"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmFirstPassword.frx":B532
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin BLacKPeaRLOCX.ButtonNix CmdOK 
         Height          =   375
         Left            =   1680
         TabIndex        =   2
         Top             =   2400
         Width           =   1215
         _ExtentX        =   2143
         _ExtentY        =   661
         BTYPE           =   5
         TX              =   "Set"
         ENAB            =   -1  'True
         BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         COLTYPE         =   2
         FOCUSR          =   0   'False
         BCOL            =   1184274
         BCOLO           =   16777215
         FCOL            =   49152
         FCOLO           =   49152
         MCOL            =   12632256
         MPTR            =   1
         MICON           =   "FrmFirstPassword.frx":B54E
         UMCOL           =   -1  'True
         SOFT            =   0   'False
         PICPOS          =   0
         NGREY           =   0   'False
         FX              =   0
         HAND            =   0   'False
         CHECK           =   0   'False
         VALUE           =   0   'False
      End
      Begin VB.Shape Shape2 
         BackColor       =   &H00004040&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H00C0FFC0&
         Height          =   345
         Left            =   1680
         Shape           =   4  'Rounded Rectangle
         Top             =   1800
         Width           =   2490
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H00004040&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H00C0FFC0&
         Height          =   345
         Left            =   1680
         Shape           =   4  'Rounded Rectangle
         Top             =   1320
         Width           =   2490
      End
      Begin VB.Shape Shape3 
         BackColor       =   &H00004040&
         BackStyle       =   1  'Opaque
         BorderColor     =   &H00C0FFC0&
         Height          =   345
         Left            =   1680
         Shape           =   4  'Rounded Rectangle
         Top             =   840
         Width           =   2490
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "Password"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "Ulangi Password"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1800
         Width           =   1455
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "Nama User"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H0000C000&
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   840
         Width           =   1335
      End
   End
End
Attribute VB_Name = "FrmFirstPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdBatal_Click()
End
End Sub

Private Sub cmdOK_Click()
On Error GoTo hell
rec.Open "useraccount", conn, , adLockOptimistic
Dim passwd As String
    If TxtPassword.Text = TxtPasswordLagi.Text Then
    passwd = EncryptText(TxtPassword.Text, "password")
        rec.AddNew
        rec(0) = TxtUser.Text
        rec(1) = "root"
        rec(2) = "root"
        rec(3) = "BLacK PeaRL Cyber Community"
        rec(4) = "Must Be Hide"
        rec(5) = passwd
        rec(6) = App.path & "/Operator/root.gif"
        rec(7) = 0
        rec(8) = Now
        rec(9) = 0
        rec.Update
        MsgBox "Password telah disimpan. Pastikan pemegang access root adalah admin program ini,restart billing untuk menjalankan program dan konfigurasi selanjutnya.", vbInformation, "Root password has been saved"
        Unload Me
        End
        Else
     MsgBox "Konfirmasi password anda salah.", vbCritical, "Wrong Confirmation"

    End If
    rec.Close
IfNoErr:
Exit Sub
hell:
 TulisError Err.Description, Err.Number, "cmdLock", Me.Name
 Resume IfNoErr
    End Sub
Private Sub Form_Activate()
On Error Resume Next
    TxtUser.Text = "root"
End Sub

Private Sub Form_Load()
StyleS
End Sub

Private Sub TxtPasswordLagi_Change()
If KeyAscii = 13 Then
Call cmdOK_Click
End If
End Sub

Private Sub TxtPasswordLagi_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdOK_Click
End If
End Sub

Private Sub StyleS()
On Error Resume Next
Dim ctrl As Control
For Each ctrl In Controls
If FrmStyles.txtnamastyle.Text = "Default" Then
Exit Sub
Else
    If (TypeOf ctrl Is ButtonNix) And _
        ctrl.Name <> "cmdSwitchStyle" Then
        ctrl.ButtonType = FrmStyles.txtlButtonType.Text
        ctrl.ColorScheme = FrmStyles.txtlColorScheme.Text
        ctrl.Backcolor = FrmStyles.txtlBackcolor.Text
        ctrl.BackOver = FrmStyles.txtlBackOver.Text
        ctrl.Forecolor = FrmStyles.txtlForecolor.Text
        ctrl.ForeOver = FrmStyles.txtlForeOver.Text
       
    End If
        If (TypeOf ctrl Is BLacKFrame) And _
        ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.BackColor1 = FrmStyles.frameBackColor1.Text
         ctrl.BackColor2 = FrmStyles.frameBackColor2.Text
         ctrl.BorderColor = FrmStyles.frameBorderColor.Text
         ctrl.Forecolor = FrmStyles.frameForecolor.Text
         ctrl.TitleColor1 = FrmStyles.frameTitleColor1.Text
         ctrl.TitleColor2 = FrmStyles.frameTitleColor2.Text
         If FrmStyles.frameBackGradient.Text = 0 Then
         ctrl.BackGradient = None
         ElseIf FrmStyles.frameBackGradient.Text = 1 Then
         ctrl.BackGradient = Vertical
         ElseIf FrmStyles.frameBackGradient.Text = 2 Then
         ctrl.BackGradient = Horizontal
         End If
         
         If FrmStyles.Frametitlegradient.Text = 0 Then
         ctrl.TitleGradient = None
         ElseIf FrmStyles.Frametitlegradient.Text = 1 Then
         ctrl.TitleGradient = Vertical
         ElseIf FrmStyles.Frametitlegradient.Text = 2 Then
         ctrl.TitleGradient = Horizontal
         End If

    End If
        If (TypeOf ctrl Is BLacKText) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.TForecolor.Text
         ctrl.Backcolor = FrmStyles.TBackcolor.Text
         ctrl.BackColorMain = FrmStyles.TBackColorMain.Text
         ctrl.BorderColor = FrmStyles.TBorderColor.Text
         ctrl.FocusBackColor = FrmStyles.TFocusBackColor.Text
         ctrl.FocusBackMainColor = FrmStyles.TFocusBackMainColor.Text
         ctrl.FocusBorderColor = FrmStyles.TFocusBorderColor.Text
         ctrl.FocusForeColor = FrmStyles.TFocusForeColor.Text
    End If
        If (TypeOf ctrl Is MSFlexGrid) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.GDBackcolor.Text
         ctrl.BackColorBkg = FrmStyles.GDBackColorBkg.Text
         ctrl.BackColorSel = FrmStyles.GDBackColorSel.Text
         ctrl.BackColorFixed = FrmStyles.GDBackColorFixed.Text
         ctrl.ForeColorSel = FrmStyles.GDForeColorSel.Text
         ctrl.Forecolor = FrmStyles.GDForecolor.Text
         ctrl.ForeColorFixed = FrmStyles.GDForeColorFixed.Text
         ctrl.GridColor = FrmStyles.GDGridColor.Text
         ctrl.GridColorFixed = FrmStyles.GDGridColorFixed.Text
    End If
        If (TypeOf ctrl Is TextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lbltextfore.Text
         ctrl.Backcolor = FrmStyles.lbltextback.Text
    End If
        If (TypeOf ctrl Is ComboBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.cboForeColor.Text
         ctrl.Backcolor = FrmStyles.cboBackcolor.Text
    End If
        If (TypeOf ctrl Is Label) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.lblForeColor.Text
    End If
        If (TypeOf ctrl Is RichTextBox) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.RcBackcolor.Text
    End If
    
            If (TypeOf ctrl Is OptionButton) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Forecolor = FrmStyles.opForecolor.Text
         ctrl.Backcolor = FrmStyles.opBackcolor.Text
    End If
            If (TypeOf ctrl Is ListView) And _
         ctrl.Name <> "cmdSwitchStyle" Then
         ctrl.Backcolor = FrmStyles.LBackColor.Text
    End If
    Me.Backcolor = FrmStyles.WFore.Text
    End If
Next ctrl
End Sub


Private Sub txtuser_GotFocus()
TxtUser.Backcolor = &H0&
TxtUser.Forecolor = vbWhite
End Sub

Private Sub txtuser_LostFocus()
TxtUser.Backcolor = &H404040
TxtUser.Forecolor = &HC000&
End Sub

Private Sub TxtPassword_GotFocus()
TxtPassword.Backcolor = &H0&
TxtPassword.Forecolor = vbWhite
End Sub

Private Sub TxtPassword_LostFocus()
TxtPassword.Backcolor = &H404040
TxtPassword.Forecolor = &HC000&
End Sub

Private Sub TxtPasswordLagi_GotFocus()
TxtPasswordLagi.Backcolor = &H0&
TxtPasswordLagi.Forecolor = vbWhite
End Sub

Private Sub TxtPasswordLagi_LostFocus()
TxtPasswordLagi.Backcolor = &H404040
TxtPasswordLagi.Forecolor = &HC000&
End Sub

